import { lazy} from 'react'

import {
  AppOutline,
  MessageOutline,
  MessageFill,
  UnorderedListOutline,
  UserOutline,
} from 'antd-mobile-icons'

let Main =lazy(()=>import('../pages/main/Index'))
let Home =lazy(()=>import('../pages/home/Index'))
let Classfiy =lazy(()=>import('../pages/classfiy/Index'))
let Message =lazy(()=>import('../pages/message/Index'))
let User =lazy(()=>import('../pages/user/Index'))
let City =lazy(()=>import('../pages/city/Index'))
let Detail =lazy(()=>import('../pages/detail/Index'))
let List =lazy(()=>import('../pages/list/Index'))
let Order =lazy(()=>import('../pages/order/Index'))
let Search =lazy(()=>import('../pages/search/Index'))
let Service =lazy(()=>import('../pages/service/Index'))
let Error =lazy(()=>import('../pages/404/Index'))
let Login =lazy(()=>import('../pages/login/Index'))
let Map =lazy(()=>import('../pages/map/Index'))
export let homeRouter=[
    {
        path:'/',
        element:<Home></Home>,
        title:'首页',
        icon:<AppOutline></AppOutline>
    },
      {
        path:'/classfiy',
        element:<Classfiy></Classfiy>,
        title:'分类',
          icon:<MessageOutline></MessageOutline>
    },
      {
        path:'/message',
        element:<Message></Message>,
        title:'消息',
          icon:<UnorderedListOutline></UnorderedListOutline>
    },
      {
        path:'/user',
        element:<User></User>,
        title:'个人',
          icon:<UserOutline></UserOutline>
    },
]


let routes=[
    {
        path:'/',
        element:<Main></Main>,
         children:homeRouter
    },
    {
        path:'/city',
        element:<City></City>,
       
    },
    {
        path:'/detail',
        element:<Detail></Detail>,
    },
    {
        path:'/list',
        element:<List></List>,
    },
    {
        path:'/order',
        element:<Order></Order>,
    },
    {
        path:'/search',
        element:<Search></Search>,
    },
    {
        path:'/service',
        element:<Service></Service>,
    },
    {
        path:'/login',
        element:<Login></Login>,
    },
    {
        path:'/map',
        element:<Map></Map>,
    },
    {
        path:'*',
        element:<Error></Error>,
    },
]

export default routes